package com.itany.corejava.day18;

import java.io.Serializable;

public class Person implements Cloneable, Serializable {

    public static int count;

    private String id;
    private String name;
    private int age;
    private boolean sex;

    public Person()throws NullPointerException,ArrayIndexOutOfBoundsException {
        System.out.println("Person.Person()");
    }

    public Person(String name, int age, boolean sex) {
        System.out.println("Person.Person(String,int,boolean)");
        System.out.println("name = [" + name + "], age = [" + age + "], sex = [" + sex + "]");
        this.name = name;
        this.age = age;
        this.sex = sex;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) throws NullPointerException,ArrayIndexOutOfBoundsException {
        this.age = age;
    }

    public boolean isSex() {
        return sex;
    }

    public void setSex(boolean sex) {
        this.sex = sex;
    }

    public static int getCount() {
        return count;
    }

    public static void setCount(int count) {
        Person.count = count;
    }

    public void f(String... s){

    }

    private void fn1(){
        System.out.println("Person.fn1");
    }

    public int fn2(int i){
        System.out.println("Person.fn2");
        return i+1;
    }

    public static void fn3(){
        System.out.println("Person.fn3");
    }
}

